<template>
	<view class="msg-box">
		<view class="user-box">
			<view class="cus-title">车辆信息详情</view>
			<view class="user-type">				
				<formItem 
				v-for="(item,index) in carList" 
				:label="item.label" :key="index" 
				v-model="form[item.model]" 
				:disabled="disabled" 
				titleType="dotted-title"></formItem>
			</view>
		</view>		
	</view>
</template>

<script>
	import formItem from '../../../../../components/lt-formItem/index.vue';
	import { personalCustomerDetails } from '@/api/cusList.js'
	export default{
		components:{
			formItem
		},
		props:{
			cusType:{type:String,default:'person'},
			orderId:{type:String,default:''},
			params:{type:Object,default:()=>{}}
		},
		async mounted(){
			let res = await personalCustomerDetails(this.params)
			this.form = res.rows.vehicleDetails
		},
		data(){
			return{
				disabled:true,
				carList:[
					{
						label:'VIN',
						model:'vin'
					},{
						label:'车牌号',
						model:'carLicense'
					},{
						label:'品牌',
						model:'brand'
					},{
						label:'车系',
						model:'carSeries'
					},{
						label:'颜色',
						model:'color'
					},{
						label:'内饰',
						model:'carInColor'
					},{
						label:'选装',
						model:'optionalPag'
					},{
						label:'电池编号',
						model:'batteryNumber'
					},{
						label:'前电机号',
						model:'frontMotorNumber'
					},{
						label:'后电机号',
						model:'rearMotorNumber'
					},{
						label:'VCU',
						model:'vcu'
					},{
						label:'合格证号',
						model:'certificateNo'
					},{
						label:'生产日期',
						model:'dateOfManufacture'
					},{
						label:'销售日期',
						model:'salesDate'
					}
				],
				form:{
				}
			}
		},
	}
</script>

<style lang="scss" scoped>
	.msg-box{
		padding: 24upx 24upx 24upx 24upx;
		.user-box{
			background-color: #fff;
			.cus-title{
				width: 100%;
				height: 80upx;
				// background-color: #f05;
				line-height: 80upx;
				padding-left: 24upx;
				border-bottom: 1upx solid #ddd;
			}
			.user-type{
				padding:0 12upx 48upx 12upx ;
			}
		}
	}
</style>
